import ctypes


class Point_2(ctypes.Structure):
    _fields_ = [("x", ctypes.c_int), ("y", ctypes.c_int)]


class Point_2d(ctypes.Structure):
    _fields_ = [("x", ctypes.c_double), ("y", ctypes.c_double)]


obj_angle_c = ctypes.CDLL("lib_c/handlers/lib_math.so", mode=ctypes.RTLD_GLOBAL)
obj_angle_c.hand_angle.argtypes = [
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
]
obj_angle_c.hand_angle.restype = ctypes.c_float

obj_angle_c.rotation_points_2.argtypes = [
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
]
obj_angle_c.rotation_points_2.restype = Point_2d

obj_angle_c.static_сenter_coordinate.argtypes = [
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
    ctypes.c_int,
]
obj_angle_c.static_сenter_coordinate.restype = Point_2
obj_angle_c.filter_angle.argtypes = [ctypes.c_int, ctypes.c_double, ctypes.c_float]
obj_angle_c.filter_angle.restype = ctypes.c_int
# obj_angle_c.сenter_coordinate.argtypes = [ctypes.c_int, ctypes.Array]
# obj_angle_c.сenter_coordinate.restype = Point_2
